package com.cn.gateway.model;

import org.slf4j.MDC;

import static com.cn.gateway.model.CommonLogConstant.COMMON_MDC_PARAM_TRACE_ID;

/**
 * @author huangzz
 * 普通异常影响实体
 */
public class ExceptionResponse {
    private String traceId;

    private String errorCode;

    private String errorMsg;

    public ExceptionResponse(String errorCode, String errorMsg) {
        this.traceId = MDC.get(COMMON_MDC_PARAM_TRACE_ID);
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
    }

    public String getTraceId() {
        return traceId;
    }

    public void setTraceId(String traceId) {
        this.traceId = traceId;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }


}
